package edu.hawaii.duedates;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.util.List;

import org.junit.Test;

/**
 * Implements testing of the CommandLineParser class.
 * 
 * @author Aric West
 */
public class TestCommandLineParser {

  /**
   * Testing basic operations of the CommandLineParser class.
   * 
   * @exception Exception Add thrown info.
   */
  @Test
  public void testNormalOperation() throws Exception {
    String[] args = {"-test", "one", "two", "three"};
    CommandLineParser parser = new CommandLineParser(args);
    List<DueDatesOption> cf = parser.getOptions();
    
    assertEquals("command is -test", cf.get(0).getCommand(), "-test");
    assertNotNull("Parser not found", parser);
  }
}
